Conventionally, multimedia such as video and audio has been delivered using analog delivery mediums such as NTSC (National Television System Committee) signals, and has been stored using analog storage mediums such as video cassette recorders. With the advent of digital delivery mediums, such as ATSC (Advanced Television Systems Committee) signals, and of digital storage mediums and DVDs, multimedia can be delivered and stored using pure digital signals. Digital signals typically contain compressed frames of video.
Traditionally, video is compressed using an encoder adapted to receive an uncompressed input stream and generate an output stream in a compressed format. The output stream may, for example, be stored to a digital storage medium or transmitted over a network in the compressed format. For playback, a decoder at a remote receiver receives the compressed media stream (e.g., from the storage medium or from the network) and generates an uncompressed output stream that that can be directly coupled to the playback device.
Compressed video may also be obtained from a transcoder. A transcoder converts a digital media stream from a first compressed format to a second compressed format. Typically, a transcoder comprises a decoder, a processing unit, and an encoder. The decoder receives a compressed media stream in a first compressed format and decodes the media stream to an intermediate format. The media stream is processed by the processing unit in the intermediate format and outputted to the encoder. The encoder encodes the media stream to a second compressed format that may be different than the first compressed format.
Generally, compressing media reduces the amount of data used to represent the media and reduces the bit rate, defined as the number of bits processed or transmitted per unit of time. Reducing bit rate advantageously reduces system requirements for processing power, network bandwidth, and storage capacity. However, reducing the bit rate comes at a cost of increased distortion and a drop in video quality. Video quality can be described as a measure of perceived degradation in the video as a result of compressing the video. For example, a video quality measure may describe the relative degradation between an original uncompressed video stream and a final decoded video stream at a remote receiver.
FIG. 1A illustrates the general relationship between bit rate, distortion, and quality. As bit rate increases, distortion typically decreases and quality increases because more information is available to describe the video frames. According to various protocols, a higher bit rate may result in increased frame rate or resolution, or decreased quantization. A bit rate that falls too low can result in very high distortion and unacceptably poor video quality. The extent to which a change in bit rate affects video quality is also determined by the content, and particularly the level of detail, in the video frames. Detail refers to the quantity of information needed to describe a segment of video at a particular level of quality. For example, a video sequence having slow motion and large uniform areas has relatively low detail compared to a video sequence having high motion and high spatial variation.
In FIG. 1B, the level of detail determines which curve represents the relationship between bit rate, distortion, and quality. If detail increases, there is a resulting increase in bit rate and/or increase in distortion (and associated drop in quality). Due to limitations in buffer sizes, network bandwidth, and other constraints, conventional devices are generally forced to impose a near constant bit rate. In order to do so, conventional devices must increase distortion (e.g., by increasing quantization) for frames with increased detail. This further means that the conventional system cannot directly control the quality level and instead allows quality to fluctuate over time.
FIG. 2 illustrates a conventional encoder configuration that embodies the principles described above. The conventional encoder configuration attempts to maintain a constant bit rate by adjusting quantization based on the bit rate. An encoder 200 is coupled to an uncompressed input source 202. The encoder 200 encodes the uncompressed input source 202 to generate a compressed output stream 204. The encoder is coupled to a rate controller 210 to control the quantization level 208 in the encoder 200. The rate controller 210 is supplied the bit rate 206 from the encoder estimating the level of detail in the input stream 202. Based on the bit rate 206 and a target bit rate 212 set external to the encoder configuration, the quantization controller 210 determines the quantization level 208 to be used by the encoder 200.
The conventional system controls the output bit rate but has no direct control over output quality. As a result of controlling the bit rate and varying frame detail, the level of distortion and quality varies in the compressed output stream. Thus, the conventional encoder 200 may generate video with low quality for sequences of highly detailed frames. Further, when the frame detail is very low, the bit rate may be set unnecessarily high, wasting processing, networking, and storage resources. In view of the problems presented above, the present state of the art lacks a video conversion device that can receive a target quality level and adjust the output bit rate over time to match the target quality.